package com.dongnam.quanly.common.dao;

import java.util.List;

import org.hibernate.Query;
import org.hibernate.Session;

import com.dongnam.quanly.common.model.PhieuNhapXuat;
import com.dongnam.quanly.common.persistence.HibernateUtil;

public class PhieuNhapXuatDao extends ExtendedGenericDao<PhieuNhapXuat, String> {

	public List<String> getListPNX(String sodonhang) {

		String queryString = "Select p.soChungTu from PhieuNhapXuat p where p.donHang=:sodonhang ";
		Query query = getSession().createQuery(queryString);

		query.setParameter("sodonhang", sodonhang);

		@SuppressWarnings("unchecked")
		List<String> list = query.list();

		return list;

	}
}
